Erdogan Suffers Blow As Ruling Party Defeated